package com.erclab.internal.xpresso.formelements;

import java.util.Properties;

import com.erclab.internal.xpresso.forms.Form;

public class PasswordConfirm extends SimplePasswordLogin {

	
	// TODO: this is exactly the same method as SimplePasswordLogin
	// except for the id field
	// We should change this.
	public String toHTML(Form theForm) {
		StringBuffer sb = new StringBuffer();
		sb.append("<INPUT TYPE=\"password\" name=\"Field");
		sb.append(this.idFormElement);
		sb.append("\" id=\"Confirm" + this.destinationColumn  + "\" ");
		if (theForm.getFormParameters().getAction().equals("update")){
			if(originalValue != null){
				sb.append("value=\"" + originalValue + "\" ");
			}
		}
		sb.append(">");
		
		return sb.toString();

	}
}
